package work.xiaohong.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import work.xiaohong.mybatisplus.vo.SUserDeptVo;
import work.xiaohong.mybatisplus.entity.SUser;
import work.xiaohong.mybatisplus.mapper.SUserMapper;
import work.xiaohong.mybatisplus.service.ISUserService;

import java.util.List;

/**
 * 用户表 服务实现类
 * @author xiaohong
 * @since 2021-10-22 10:10:22
 */
@Service
@SuppressWarnings("all")
public class SUserServiceImpl extends ServiceImpl<SUserMapper, SUser> implements ISUserService {

    @Autowired
    private SUserMapper sUserMapper;

    /**
     * 连表查询SUser和Dept
     * @return
     */
    @Override
    public List<SUserDeptVo> findAllUserAndDept() {
        return sUserMapper.findAllUserAndDept();
    }
}
